package psn.zjk.common.diy;

import java.awt.*;

/**
 * 阻止休眠
 * @author zhangjk
 * @CREATE_TIME 2020/12/7 9:16
 */
public class ImWorking {

    public static void main(String[] args) throws AWTException, InterruptedException {
        Robot robot = new Robot();
        long timeout = 60 * 4 * 1000;
        if (args.length > 0) {
            timeout = Long.parseLong(args[0]);
        }
        while (true) {
            Thread.sleep(timeout);
            robot.keyRelease(50);
        }
    }

}